load("@fbcode_macros//build_defs/lib:rust_oss.bzl", "rust_oss")
load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")
load("@fbsource//tools/build_defs:rust_unittest.bzl", "rust_unittest")

oncall("scm_server_infra")

rust_library(
    name = "blobstore_factory",
    srcs = glob(["factory/src/**/*.rs"]),
    autocargo = {"cargo_toml_dir": "factory"},
    named_deps = {"slog": "//common/rust/shed/tracing_slog_compat:tracing_slog_compat"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:rand_distr",
        "fbsource//third-party/rust:tokio",
        ":blobstore",
        ":blobstore_stats",
        ":cacheblob",
        ":chaosblob",
        ":delayblob",
        ":fileblob",
        ":logblob",
        ":multiplexedblob",
        ":multiplexedblob_wal",
        ":packblob",
        ":prefixblob",
        ":readonlyblob",
        ":s3blob",
        ":samplingblob",
        ":sqlblob",
        ":throttledblob",
        "//common/rust/shed/cached_config:cached_config",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/sql:sql",
        "//eden/mononoke/blobstore_sync_queue:blobstore_sync_queue",
        "//eden/mononoke/cmdlib:arg_extensions",
        "//eden/mononoke/common/futures_watchdog:futures_watchdog",
        "//eden/mononoke/common/rust/sql_ext:sql_ext",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/common/sql_construct:sql_construct",
        "//eden/mononoke/facebook/manifoldblob:manifoldblob",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "blobstore",
    srcs = glob(["src/**/*.rs"]),
    named_deps = {"bincode": "fbsource//third-party/rust:bincode-2"},
    test_deps = [
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:auto_impl",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:either",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:serde_derive",
        "fbsource//third-party/rust:strum",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:trait-set",
        "fbsource//third-party/rust:zstd",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/common/futures_watchdog:futures_watchdog",
        "//eden/mononoke/server/context:context",
        "//thrift/lib/rust:fbthrift",
    ],
)

rust_library(
    name = "cacheblob",
    srcs = glob(["cacheblob/**/*.rs"]),
    autocargo = {"cargo_toml_dir": "cacheblob"},
    test_deps = [
        ":memblob",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-stream",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        ":blobstore",
        ":prefixblob",
        ":redactedblobstore",
        "//common/rust/shed/cachelib_stub:cachelib",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/hostname:hostname",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//common/rust/shed/lock_ext:lock_ext",
        "//common/rust/shed/memcache_stub:memcache",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/blobstore/if:memcache-lock-thrift-rust",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
        "//thrift/lib/rust:fbthrift",
    ],
)

rust_unittest(
    name = "blobstore-test",
    srcs = glob(["test/**/*.rs"]),
    crate = "blobstore_test",
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:strum",
        "fbsource//third-party/rust:tempfile",
        ":blobstore",
        ":cacheblob",
        ":fileblob",
        ":memblob",
        ":sqlblob",
        "//cachelib/rust:cachelib",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "chaosblob",
    srcs = glob(["chaosblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "chaosblob"},
    test_deps = [
        ":memblob",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:thiserror",
        ":blobstore",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "fileblob",
    srcs = glob(["fileblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "fileblob"},
    test_deps = [
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:percent-encoding",
        "fbsource//third-party/rust:tempfile",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:walkdir",
        ":blobstore",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "redactedblobstore",
    srcs = glob([
        "redactedblobstore/src/**/*.rs",
    ]),
    autocargo = {"cargo_toml_dir": "redactedblobstore"},
    test_deps = [
        "fbsource//third-party/rust:assert_matches",
        "fbsource//third-party/rust:maplit",
        ":memblob",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tracing",
        ":blobstore",
        ":prefixblob",
        "//common/rust/shed/cached_config:cached_config",
        "//common/rust/shed/facet:facet",
        "//configerator/structs/scm/mononoke/redaction:redaction_set-rust",
        "//eden/mononoke/common/reloader:reloader",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "packblob",
    srcs = glob([
        "packblob/src/**/*.rs",
    ]),
    autocargo = {"cargo_toml_dir": "packblob"},
    test_deps = [
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:rand_xorshift",
        ":memblob",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:ascii",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bufsize",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:zstd",
        ":blobstore",
        "//eden/mononoke/blobstore/packblob/if:packblob-thrift-rust",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
        "//thrift/lib/rust:fbthrift",
    ],
)

rust_library(
    name = "s3blob",
    srcs = glob(["s3blob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "s3blob"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:chrono",
        "fbsource//third-party/rust:hyper-0-14",
        "fbsource//third-party/rust:hyper-openssl",
        "fbsource//third-party/rust:nonzero_ext",
        "fbsource//third-party/rust:openssl",
        "fbsource//third-party/rust:rusoto_core",
        "fbsource//third-party/rust:rusoto_credential",
        "fbsource//third-party/rust:rusoto_s3",
        "fbsource//third-party/rust:rusoto_sts",
        "fbsource//third-party/rust:tokio",
        "//common/rust/shed/futures_stats:futures_stats",
        "//common/rust/shed/time_ext:time_ext",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "sqlblob",
    srcs = glob([
        "sqlblob/src/**/*.rs",
        "sqlblob/schema/**/*.sql",
    ]),
    autocargo = {"cargo_toml_dir": "sqlblob"},
    test_deps = [
        "fbsource//third-party/rust:strum",
        "fbsource//third-party/rust:tokio",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/server/context:context",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:base64",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:nonzero_ext",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tokio-stream",
        "fbsource//third-party/rust:twox-hash",
        "fbsource//third-party/rust:vec1",
        ":blobstore",
        "//common/rust/shed/cached_config:cached_config",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/sql:sql",
        "//common/rust/shed/stats:stats",
        "//common/rust/smc-thrift:smc-thrift",
        "//common/smc/if:Smc2-rust-clients",
        "//configerator/structs/scm/mononoke/xdb_gc:xdb_gc_structs-rust",
        "//dba/myadmin/if:if-myadmin-rust",
        "//dba/myadmin/if:if-myadmin-rust-clients",
        "//dba/myadmin/if:if-myadmin-rust-srclients",
        "//eden/mononoke/common/rust/sql_ext:sql_ext",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "delayblob",
    srcs = glob(["delayblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "delayblob"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:rand_distr",
        "fbsource//third-party/rust:tokio",
        ":blobstore",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "multiplexedblob",
    srcs = glob(["multiplexedblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "multiplexedblob"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:chrono",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:strum",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:twox-hash",
        ":blobstore",
        ":blobstore_stats",
        "//common/rust/shed/futures_stats:futures_stats",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "multiplexedblob_wal",
    srcs = glob(["multiplexedblob_wal/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "multiplexedblob_wal"},
    test_deps = [
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:nonzero_ext",
        ":blobstore_test_utils",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//common/rust/shed/lock_ext:lock_ext",
        "//eden/mononoke/common/sql_construct:sql_construct",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tokio",
        ":blobstore",
        ":blobstore_stats",
        ":multiplexedblob",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/futures_stats:futures_stats",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//common/rust/shed/time_ext:time_ext",
        "//eden/mononoke/blobstore_sync_queue:blobstore_sync_queue",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "memblob",
    srcs = glob(["memblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "memblob"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        ":blobstore",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "prefixblob",
    srcs = glob(["prefixblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "prefixblob"},
    test_deps = [
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:maplit",
        ":memblob",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:inlinable_string",
        ":blobstore",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "readonlyblob",
    srcs = glob(["readonlyblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "readonlyblob"},
    test_deps = [
        ":memblob",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:thiserror",
        ":blobstore",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "samplingblob",
    srcs = glob(["samplingblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "samplingblob"},
    test_deps = [
        ":memblob",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        ":blobstore",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "throttledblob",
    srcs = glob(["throttledblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "throttledblob"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:governor",
        "fbsource//third-party/rust:nonzero_ext",
        ":blobstore",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "logblob",
    srcs = glob(["logblob/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "logblob"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        ":blobstore",
        ":blobstore_stats",
        "//common/rust/shed/futures_stats:futures_stats",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "blobstore_stats",
    srcs = glob(["blobstore_stats/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "blobstore_stats"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:strum",
        ":blobstore",
        "//common/rust/shed/futures_stats:futures_stats",
        "//common/rust/shed/time_ext:time_ext",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "virtually_sharded_blobstore",
    srcs = glob(["virtually_sharded_blobstore/src/*.rs"]),
    autocargo = {"cargo_toml_dir": "virtually_sharded_blobstore"},
    test_deps = [] if rust_oss.is_oss_build() else [
        "fbsource//third-party/rust:assert_matches",
        "fbsource//third-party/rust:governor",
        "fbsource//third-party/rust:nonzero_ext",
        "fbsource//third-party/rust:tokio",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//common/rust/shed/slog_glog_fmt:slog_glog_fmt",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
    ],
    test_named_deps = ({} if rust_oss.is_oss_build() else {
        "slog": "//common/rust/shed/tracing_slog_compat:tracing_slog_compat",
    }),
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:scopeguard",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:twox-hash",
        ":blobstore",
        ":cacheblob",
        "//common/rust/shed/cachelib_stub:cachelib",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/futures_stats:futures_stats",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//common/rust/shed/shared_error:shared_error",
        "//common/rust/shed/stats:stats",
        "//common/rust/shed/time_ext:time_ext",
        "//eden/mononoke/common/async_limiter:async_limiter",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "ephemeral_blobstore",
    srcs = glob([
        "ephemeral_blobstore/src/*.rs",
        "ephemeral_blobstore/schemas/**/*.sql",
    ]),
    autocargo = {"cargo_toml_dir": "ephemeral_blobstore"},
    named_deps = {"bincode": "fbsource//third-party/rust:bincode-2"},
    test_deps = [
        "fbsource//third-party/rust:maplit",
        ":memblob",
        ":packblob",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types-mocks",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-stream",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:chrono",
        "fbsource//third-party/rust:derivative",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:smallvec",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:vec1",
        ":blobstore",
        ":prefixblob",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/futures_lazy_shared:futures_lazy_shared",
        "//common/rust/shed/scuba_stub:scuba",
        "//common/rust/shed/sql:sql",
        "//eden/mononoke/bonsai_globalrev_mapping:bonsai_globalrev_mapping",
        "//eden/mononoke/common/rust/sql_ext:sql_ext",
        "//eden/mononoke/common/sql_construct:sql_construct",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph_types:commit_graph_types",
        "//eden/mononoke/repo_attributes/commit_graph/memwrites_commit_graph_storage:memwrites_commit_graph_storage",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_attributes/sql_query_config:sql_query_config",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "blobstore_test_utils",
    srcs = glob(["test_utils/*.rs"]),
    autocargo = {"cargo_toml_dir": "test_utils"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:tokio",
        ":blobstore",
        "//common/rust/shed/lock_ext:lock_ext",
        "//eden/mononoke/blobstore_sync_queue:blobstore_sync_queue",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)
